package com.techsoul.module.basic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.techsoul.module.basic.pojo.entity.TBmLocation;
import com.techsoul.module.basic.pojo.param.TBmLocationSearchParam;
import com.techsoul.module.basic.pojo.vo.TBmLocationVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 城市地址Mapper接口
 * 
 * @author liuen
 * @date 2023-02-25
 */
public interface TBmLocationMapper extends BaseMapper<TBmLocation> {

    /**
     * 详情
     * @param id
     * @return
     */
    TBmLocationVo findById(String id);

    TBmLocationVo findByTreeId(@Param("treeIds") String treeIds);


    List<TBmLocationVo> findByLocationName(String locationName);
    TBmLocationVo findBytreeName(@Param("name") String name);
    /**
     * 列表
     * @param params
     * @return
     */
    List<TBmLocationVo> findAll(@Param("params") TBmLocationSearchParam params);

    /**
     * 分页
     * @param page
     * @param params
     * @return
     */
    IPage<TBmLocationVo> findAll(Page page, @Param("params") TBmLocationSearchParam params);

}
